<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改运营指标')"/>
    <th:block th:include="include :: select2-css"/>
</head>
<style>
    input::-webkit-outer-spin-button,
    input::-webkit-inner-spin-button {
        -webkit-appearance: none;
    }

    input[type="number"] {
        -moz-appearance: textfield;
    }
</style>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-index-edit">
        <input type="hidden" name="id" th:value="${index.id}"/>
        <div class="form-group">
            <label class="col-sm-3 control-label">年份：</label>
            <div class="col-sm-8">
                <select name="years" class="form-control">
                    <option value="">请选择</option>
                    <option th:each="years : ${years}" th:text="${years.years}+'年'"
                            th:value="${years.years}" th:selected="${years.years==index.years}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">月份：</label>
            <div class="col-sm-8">
                <select name="months" class="form-control">
                    <option value="">请选择</option>
                    <option th:each="months : ${months}" th:text="${months.monthInYear}+'月'"
                            th:value="${months.monthInYear}"
                            th:selected="${months.monthInYear==index.months}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">一级节点完成率：</label>
            <div class="col-sm-8">
                <input class="form-control" type="number" name="completionRate" placeholder="请输入一级节点完成率"
                       th:value="${index.completionRate}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">当年产值转化率：</label>
            <div class="col-sm-8">
                <input class="form-control" type="number" name="changeRate" placeholder="请输入当年产值转化率"
                       th:value="${index.changeRate}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">人均产值：</label>
            <div class="col-sm-8">
                <input class="form-control" type="number" name="perOutputValue" placeholder="请输入人均产值"
                       th:value="${index.perOutputValue}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">人均毛利：</label>
            <div class="col-sm-8">
                <input class="form-control" type="number" name="perGrossProfit" placeholder="请输入人均毛利"
                       th:value="${index.perGrossProfit}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">开工竣备周期：</label>
            <div class="col-sm-8">
                <input class="form-control" type="number" name="strCycle" placeholder="请输入开工竣备周期"
                       th:value="${index.strCycle}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">应收账款账期：</label>
            <div class="col-sm-8">
                <input class="form-control" type="number" name="accountPeriod" placeholder="请输入应收账款账期"
                       th:value="${index.accountPeriod}">
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: select2-js"/>
<script>
    var prefix = ctx + "biIndex";

    function submitHandler() {
        if ($.validate.form()) {
            var data = $("#form-index-edit").serializeArray();
            $.operate.save(prefix + "/edit", data);
        }
    }
</script>
</body>
</html>